<template>
  <div>
    <div class="importantpeolist">
      <div class="importantpeoitem" v-for="(item, index) in list" :key="index">
        <div class="itemlefticon" :class="'itemlefticon' + index"></div>
        <div class="itemrightnumbers">
          <div class="itemname">{{ item.field_name }}</div>
          <div class="itemnumber">
            <b>{{ item.field_value }}</b
            >人
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { postAction, getAction } from '@/api/manage.js'

export default {
  data() {
    return {
      list: []
    }
  },
  mounted() {
    this.getData()
  },
  methods: {
    getData() {
      postAction('/topic/data/listAllData/dy_dp_shzl_zdry_gk', {}).then(res => {
        if (res.result && res.result.data) {
          this.list = res.result.data
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.importantpeolist {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 10px;
  padding-top: 20px;
  box-sizing: border-box;
  .importantpeoitem {
    width: 50%;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    .itemlefticon {
      width: 64px;
      height: 52px;
      margin-right: 10px;
      &.itemlefticon0 {
        background: url("../../images/importantpeopleicon1.png") no-repeat
          center;
        background-size: 100% 100%;
      }
      &.itemlefticon1 {
        background: url("../../images/importantpeopleicon2.png") no-repeat
          center;
        background-size: 100% 100%;
      }
      &.itemlefticon2 {
        background: url("../../images/importantpeopleicon3.png") no-repeat
          center;
        background-size: 100% 100%;
      }
      &.itemlefticon3 {
        background: url("../../images/importantpeopleicon4.png") no-repeat
          center;
        background-size: 100% 100%;
      }
      &.itemlefticon4 {
        background: url("../../images/importantpeopleicon5.png") no-repeat
          center;
        background-size: 100% 100%;
      }
      &.itemlefticon5 {
        background: url("../../images/importantpeopleicon6.png") no-repeat
          center;
        background-size: 100% 100%;
      }
    }
    .itemrightnumbers {
      width: 130px;
      height: 52px;
      background: url("../../images/number_bg.png") no-repeat center;
      background-size: 100% 100%;
      position: relative;
      left: -30px;
      padding-left: 25px;
      box-sizing: border-box;
      .itemname {
        width: 100%;
        font-family: PingFang SC;
        font-weight: 400;
        font-size: 16px;
        color: #ffffff;
        text-shadow: 1px 2px 0px rgba(17, 20, 22, 0.22);
        font-style: italic;
        position: relative;
        top: -10px;
      }
      .itemnumber {
        width: 100%;
        font-family: PingFang SC;
        font-weight: 400;
        font-size: 17px;
        color: #fff;
        position: relative;
        top: -10px;
        display: flex;
        align-items: baseline;
        b {
          width: 100%;
          vertical-align: middle;
          font-family: YouSheBiaoTiHei;
          font-weight: 400;
          font-size: 31px;
          color: #19FDF5;
        }
      }
    }
  }
}
</style>
